<!--
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<header>
    <nav class="indexnav">
        <div class="navcontent">
            <div class="navlogo">
                <p title="{{config.banner[0]}}"><b>{{ composerBanner[0] }}</b></p>&nbsp;<p id="network-name" title="{{config.banner[1]}}">{{ composerBanner[1] }}</p>
            </div>
            <div class="navmain" [ngClass]="{'rightonly' : !showHeaderLinks && !usingLocally }">
                <ul *ngIf="showHeaderLinks" class="links navleft">
                    <li>
                        <button id='app_definebutton' class="action" [routerLink]="['editor']"
                                [routerLinkActive]="['active']">Define
                        </button>
                    </li>
                    <li>
                        <button id='app_testbutton' class="action" [routerLink]="['test']"
                                [routerLinkActive]="['active']">Test
                        </button>
                    </li>
                </ul>
                <ul *ngIf="!showHeaderLinks && !usingLocally" class="links navright">
                    <li>
                        <a href="{{ config.links.install }}"
                           target="_blank">
                            <svg class="nav-icon" aria-hidden="true">
                                <use xlink:href="#icon-simple_docker"></use>
                            </svg>
                            <span>Get local version</span>
                        </a>
                    </li>
                </ul>
                <div *ngIf="showHeaderLinks" class="drop-select navright" [routerLinkActive]="['active']" [ngClass]="{'dropListActive' : dropListActive}">
                    <div class="drop-select-item flex-container flex">
                        <div ngbDropdown class="d-inline-block" (openChange)="onToggle($event)">
                            <button type="button" class="action" id="dropdownMenu1" ngbDropdownToggle>
                                <span title="{{ identityCardService.getCurrentIdentityCard().getUserName() }}">{{ identityCardService.getCurrentIdentityCard().getUserName() }}</span>
                            </button>
                            <div class="dropdown-menu" aria-labelledby="dropdownMenu1">
                                <button id="content" class="dropdown-item action" [routerLink]="['identity']">
                                    <div class="flex-container flex" style="justify-content:space-between">
                                        <div style="margin-right:10px">ID Registry</div>
                                    </div>
                                </button>
                                <button id="footer" class="dropdown-item action" (click)="logout()">
                                    <div class="flex-container flex">
                                        <div style="margin-right:20px"><svg class="ibm-icon" aria-hidden="true">
                                            <use xlink:href="#icon-chevron-left"></use>§
                                        </svg></div>
                                        <div>My Business Networks</div>
                                    </div>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </nav>
</header>
<main>
    <success></success>
    <router-outlet></router-outlet>
</main>
<ng-template ngbModalContainer></ng-template>
